package tr.com.oyunus.server.command.handler.impl;

import org.jboss.netty.channel.MessageEvent;
import org.springframework.stereotype.Component;
import tr.com.oyunus.server.command.Command;
import tr.com.oyunus.server.command.handler.CommandHandler;

/**

 * User: ginnun
  */
@Component
public class VersionCommandHandler implements CommandHandler<MessageEvent> {


    @Override
    public void handleCommand(Command command, MessageEvent source) {
        source.getChannel().write("Oyunus Game Server v01");
        source.getChannel().close();
    }

    @Override
    public String[] canHandle() {
        return new String[]{"version"};
    }
}
